package service;

import dao.BookMapper;
import dao.MoneyMapper;
import pojo.Books;
import pojo.Moneys;

import java.util.List;

public class MoneyServiceImpl implements MoneyService {

//    调用dao层的操作，设置一个set接口，方便Spring管理
    private MoneyMapper moneyMapper;

    public void setMoneyMapper(MoneyMapper moneyMapper) {
        this.moneyMapper = moneyMapper;
    }


    public int addBook(Moneys money) {
        return moneyMapper.addBook(money);
    }

    public int deleteBookById(int id) {
        return moneyMapper.deleteBookById(id);
    }

    public int updateBook(Moneys books) {
        return moneyMapper.updateBook(books);
    }

    public Moneys queryBookById(int id) {
        return moneyMapper.queryBookById(id);
    }

    public List<Moneys> queryAllBook() {
        return moneyMapper.queryAllBook();
    }
}
